# PYthon 字符串拼接
## 常量的拼接
str1 = "Python教程" "http://c.biancheng.net/python/"
print("str1 =", str1)
str2 = "Java" "Python" "C++" "PHP"
print("str2 =", str2)
print()

## 使用 + 运算符拼接字符串
name = "C++教程"
url = "http://c.biancheng.net/cplus/"
info = name + "的网址是：" + url
print("info =", info)
print()

## 字符串和数字的拼接
name = "C语言中文网"
age = 8
course = 30
info = name + "已经" + str(age) + "岁了，共发布了" + repr(course) + "套教程。"
print("info =", info)
print()

## str() 和 repr() 的区别
s = "http://c.biancheng.net/shell/"
s_str = str(s)
s_repr = repr(s)

print("type(s_str) =", type(s_str))
print(s_str)
print("type(s_repr) =", type(s_repr))
print(s_repr)
print()
